Skip to main content

browserLoadRequest

Type

message

Summary

Sent when a URL has been requested.

Syntax

browserLoadRequest <pUrl>, <pType>

Description

Handle the browserLoadRequest message to perform an action when a URL has been requested.

The browserLoadRequest message is sent to the object containing the script that created the mobile browser control after a url has been requested.

Not passing the message causes the load request to not go ahead.

The browserLoadRequest is only sent if delayRequests has been set to true.

note

Delaying requests can cause web pages that load pages into sub-documents to not work correctly.

note

The browserLoadRequest message is sent in response to the webView:shouldStartLoadWithRequest: delegate method.

Parameters

NameTypeDescription

pUrl

The URL that has started to load.

pType

enum

The reason for the request.

  • "click"
  • "submit"
  • "navigate"
  • "reload"
  • "resubmit"
  • "other"

Examples

on browserLoadRequest pURL, pType
answer "Do you want to load:" && pURL with "Yes" and "No"
if it is "Yes" then
pass browserLoadRequest
else
put "Refused:" && pURL into field "Status"
end if
end browserLoadRequest

command: mobileControlCreate, mobileControlDelete, mobileControlSet

function: mobileControlGet, mobileControlTarget, mobileControls

message: browserStartedLoading, browserLoadFailed, browserFinishedLoading

Compatibility and Support

Introduced

LiveCode 4.5.3

OS

ios

Platforms

mobile

Thank you for your feedback!

Was this page helpful?